#!/usr/bin/env python

import unittest
from utils.MainLog import runGlobalLogger

import testPdeSolvers as testPdeSolvers
import testGBMPricingEngines as pEngine
import testCompareAccurancy as cMethods
import testOptEngines as oEngines


def mySuite():

    suite = unittest.TestSuite()

    suite.addTest(testPdeSolvers.Splines())
    suite.addTest(testPdeSolvers.ExactVsConstant())

    suite.addTest(testPdeSolvers.Projection())
    suite.addTest(testPdeSolvers.AssembledMatrices())
    suite.addTest(testPdeSolvers.SolvePoisson1D())
    suite.addTest(testPdeSolvers.Diffusion1D())
    suite.addTest(testPdeSolvers.RateOfConvergenceStatic())

    suite.addTest(pEngine.PlainVanillaEuroCall())
    suite.addTest(pEngine.PlainVanillaEuroPut())
    suite.addTest(pEngine.PlainVanillaAmerCall())
    suite.addTest(pEngine.PlainVanillaAmerPut())
    suite.addTest(pEngine.DigitalEuroCall())

    suite.addTest(cMethods.PlainVanillaEuroCall())
    suite.addTest(oEngines.CalVolAnalytical())
    return suite

if __name__ == '__main__':

    runGlobalLogger()
    runner = unittest.TextTestRunner(verbosity=2)
    result = runner.run(mySuite())

